<%@ Page Title="Batch Job - SalesOne" Language="C#" MasterPageFile="~/SalesOneWeb.Master" AutoEventWireup="true" CodeBehind="JobScheduler.aspx.cs" Inherits="IronOne.SalesOne.SalesOneWeb.BatchJobs.JobScheduler" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>



<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../StyleSheets/salesOne_txtstyle.css" rel="stylesheet" type="text/css" />
    
    <script language="javascript" type="text/javascript">

        window.onload = function() {
            
            changeselection();
            changejobsection();
            changeOccur();
            changeFreq();
            checking();

            if (document.getElementById('ctl00_ContentPlaceHolder1_ddlJobList').value == 'select') {
                document.getElementById('recure').style.display = 'none';
                document.getElementById('onetime').style.display = 'none';
            }
            
            var msg = document.getElementById('ctl00_MasterMsg');
            if(msg && msg.innerHTML != '')
                showMessageBlock();
        }

        

        function changejobsection() {
            var ddl = document.getElementById('ctl00_ContentPlaceHolder1_ddlScheduleType');
            
            document.getElementById('recure').style.display = 'none';
            document.getElementById('onetime').style.display = 'none';
            
            if (document.getElementById('ctl00_ContentPlaceHolder1_ddlJobList').value != 'select') {
                if (ddl.value == "onetime") {
                    document.getElementById('onetime').style.display = 'block';
                    if (recsdate != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtStartDate').value = recsdate;
                    if (recedate != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtEndDate').value = recedate;
                    if (at != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtAt').value = at;
                    if (stime != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtStartTime').value = stime;
                    if (etime != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtEndTime').value = etime;
                }
                else if (ddl.value == "recurring") {
                    document.getElementById('recure').style.display = 'block';
                    if (onetime != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtOneDate').value = onetime;
                    if (onedate != 0)
                        document.getElementById('ctl00_ContentPlaceHolder1_txtOneTime').value = onedate; 
                }
            }            
        }

        function changeOccur() {
            var rb = document.getElementById('ctl00_ContentPlaceHolder1_rbDay');
        
            var flag = false;
            if (rb.checked)
                flag = true;

            document.getElementById('ctl00_ContentPlaceHolder1_txtDay').disabled = !flag;
            document.getElementById('ctl00_ContentPlaceHolder1_txtRecMonths').disabled = !flag;
            document.getElementById('ctl00_ContentPlaceHolder1_ddlRelative').disabled = flag;
            document.getElementById('ctl00_ContentPlaceHolder1_ddlType').disabled = flag;
            document.getElementById('ctl00_ContentPlaceHolder1_txtRecMonths1').disabled = flag;
        }

        function changeFreq() {
            var rb = document.getElementById('ctl00_ContentPlaceHolder1_rbAt');
        
            var flag = false;
            if (rb.checked)
                flag = true;

            document.getElementById('ctl00_ContentPlaceHolder1_txtEvery').disabled = flag;
            document.getElementById('ctl00_ContentPlaceHolder1_ddlTimeType').disabled = flag;
            document.getElementById('ctl00_ContentPlaceHolder1_txtStartTime').disabled = flag;
            document.getElementById('ctl00_ContentPlaceHolder1_txtEndTime').disabled = flag;
            document.getElementById('ctl00_ContentPlaceHolder1_txtAt').disabled = !flag;
        }

        function checking() {
            var cb = document.getElementById('ctl00_ContentPlaceHolder1_cbEndDate');
            document.getElementById('ctl00_ContentPlaceHolder1_txtEndDate').disabled = cb.checked;
        }
        
        function changeselection() {
            var ddl = document.getElementById('ctl00_ContentPlaceHolder1_ddlOccurance');
            
            document.getElementById('daily').style.display = "none";
            document.getElementById('monthly').style.display = "none";
            document.getElementById('weekly').style.display = "none";
            
            if (ddl.value == "daily") {
                document.getElementById('daily').style.display = "block";
            }
            else if (ddl.value == "monthly") {
                document.getElementById('monthly').style.display = "block";
            }
            else {
                document.getElementById('weekly').style.display = "block";
            }
        }

        var onetime = 0, onedate = 0, recsdate = 0, recedate = 0, at = 0, stime = 0, etime = 0;

        function textChanged(id) {
            var value = document.getElementById('ctl00_ContentPlaceHolder1_' + id).value;
            
            if (id == 'txtOneDate' && onetime == 0)
                onetime = value;
            if (id == 'txtOneTime' && onedate == 0)
                onedate = value;
            if (id == 'txtStartDate' && recsdate == 0)
                recsdate = value;
            if (id == 'txtEndDate' && recedate == 0)
                recedate = value;
            if (id == 'txtAt' && at == 0)
                at = value;
            if (id == 'txtStartTime' && stime == 0)
                stime = value;
            if (id == 'txtEndTime' && etime == 0)
                etime = value; 
        }
    </script>
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    
    <table border="0" cellpadding="0" cellspacing="0">
    <tr><td>
    
    <table border="0" cellpadding="0" cellspacing="0"  >
        
        
        <tr>
            <td>
                <table border="0" cellpadding="0" cellspacing="0">
        <tr>
                        <td width="134">
                            Available Jobs*:</td>
                        <td >
                            <asp:DropDownList ID="ddlJobList" runat="server" CssClass="ddl" 
                                AutoPostBack="True" 
                                onselectedindexchanged="ddlJobList_SelectedIndexChanged" Width="240px">                            </asp:DropDownList>                            </td>
                        <td width="5">                            </td>
                        <td>&nbsp;                            
                            <asp:CheckBox ID="cbEnable" runat="server" CssClass="chbox" Text="Enabled" 
                                Enabled="False" />                            </td>
                    </tr>
                    <tr>
                      <td colspan="4" class="pix8"></td>
                    </tr>
                    <tr>
                        <td >
                            Schedule Type:</td>
                        <td>
                            <asp:DropDownList ID="ddlScheduleType" runat="server" CssClass="ddl" 
                                onchange="changejobsection(this.value);" Enabled="False" Width="240px">
                                <asp:ListItem Value="recurring" Selected="True">Recurring</asp:ListItem>
                                <asp:ListItem Value="onetime">One time</asp:ListItem>
                                <asp:ListItem Value="sqlservice">When SQL Server Agent starts</asp:ListItem>
                            </asp:DropDownList>                            </td>
                        <td>&nbsp;                            </td>
                        <td>&nbsp;                            </td>
                    </tr>
                    </table>
            </td>
           
        </tr>
        <tr>
            <td height="10"></td>
           
        </tr>
        </table>
        
        </td></tr>
        <tr><td>
        
        <div id="onetime"> <%--style="display:none">--%>
        <table border="0" cellpadding="0" cellspacing="0" >
        <tr>
                <td width="132">
                    Date:(dd/MM/yyyy)</td>
                <td >
                    <asp:TextBox onclick="textChanged('txtOneDate');" ID="txtOneDate" runat="server" CssClass="txtbox4"></asp:TextBox>
                    <cc1:CalendarExtender ID="txtOneDate_CalendarExtender" runat="server" 
                        Enabled="True" TargetControlID="txtOneDate" PopupButtonID="cal1" 
                        Format="dd/MM/yyyy">
                    </cc1:CalendarExtender>
                    &nbsp;
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ControlToValidate="txtOneDate" 
                        
                        ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>
                    </td>
                <td>
                  <img runat="server" id="cal1" src="../images/calander.jpg" />
                    
                </td>
                <td width="5">
                </td>
                <td >
                    Time:(HH:mm:ss)</td>
                <td>
                    <asp:TextBox onclick="textChanged('txtOneTime');" ID="txtOneTime" runat="server" CssClass="txtbox4"></asp:TextBox>
                </td> 
                <td>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtOneTime" 
                        ValidationExpression="^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])">*</asp:RegularExpressionValidator>
                </td>              
            </tr>
        </table>
        </div>
        
      </td></tr>
        <tr><td>
        
        
        
        <div id="recure">
        
        <table border="0" cellpadding="0" cellspacing="0" id="filter" runat="server" >
        
           
        <tr>
            <td>
            
            
            
            <fieldset   title="Frequency">
            <legend class="ph1">Frequency</legend>
                <table border="0" cellpadding="0" cellspacing="0" >
      <tr>
                        <td>
                        
                        <table  border="0" cellpadding="0" cellspacing="0">
                    <tr>
                                  <td width="130">Occurs: </td>
                                  <td><asp:DropDownList ID="ddlOccurance" runat="server" CssClass="ddl1" 
                                          onchange="changeselection(this.value);">
                                      <asp:ListItem Selected="True" Value="daily">Daily</asp:ListItem>
                                      <asp:ListItem Value="weekly">Weekly</asp:ListItem>
                                      <asp:ListItem Value="monthly">Monthly</asp:ListItem>
                                      </asp:DropDownList></td>
                                </tr>
                              </table></td>
                </tr>
                    <tr>
                      <td class="pix8"></td>
                  </tr>
                    <tr>
                        <td>
                            
                            <div id="monthly"> <%--style="display:none">--%>
                                                            <table border="0" cellpadding="0" cellspacing="0">
                                                            <tr>
                                                                <td width="130">
                                                                    <asp:RadioButton ID="rbDay" runat="server" Text="Day" GroupName="Month" 
                                                                        onclick="changeOccur('day');" Checked="True" CssClass="rdbtn"/></td>
                                                                <td>
                                                                    <table border="0"  cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td>
                                                                            <table border="0" cellpadding="0" cellspacing="0"><tr><td>
                                                                                <asp:TextBox ID="txtDay" runat="server" CssClass="txtbox4"></asp:TextBox>
                                                                                <cc1:NumericUpDownExtender ID="txtDay_NumericUpDownExtender" runat="server" 
                                                                                    Enabled="True" Maximum="31" 
                                                                                    Minimum="1" RefValues="" ServiceDownMethod="" 
                                                                                    ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="daydown" 
                                                                                    TargetButtonUpID="dayup" TargetControlID="txtDay" >   
                                                                                </cc1:NumericUpDownExtender>
                                                                             </td><td>
                                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                                    <tr><td><img id="dayup" runat="server" src="../images/top_arrow.jpg" /></td></tr>
                                                                                    <tr><td><img id="daydown" runat="server" src="../images/bot_arrow.jpg" /></td></tr>
                                                                                </table> 
                                                                             </td></tr></table>
                                                                                </td>
                                                                            <td width="5"></td>
                                                                            <td >of every</td>
                                                                            <td>
                                                                            <table border="0" cellpadding="0" cellspacing="0"><tr><td>
                                                                                <asp:TextBox ID="txtRecMonths" runat="server" CssClass="txtbox4" 
                                                                                    ></asp:TextBox>
                                                                                <cc1:NumericUpDownExtender ID="txtRecMonths_NumericUpDownExtender" 
                                                                                    runat="server" Enabled="True" Maximum="99" 
                                                                                    Minimum="1" RefValues="" ServiceDownMethod="" 
                                                                                    ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="RecMonthsdown" 
                                                                                    TargetButtonUpID="RecMonthsup" TargetControlID="txtRecMonths" >  
                                                                                    </cc1:NumericUpDownExtender>
                                                                                    </td><td>
                                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                                    <tr><td><img id="RecMonthsup" runat="server" src="../images/top_arrow.jpg" /></td></tr>
                                                                                    <tr><td><img id="RecMonthsdown" runat="server" src="../images/bot_arrow.jpg" /></td></tr>
                                                                                </table> 
                                                                             </td></tr></table>                                                                              
                                                                                </td>
                                                                            <td>
                                                                                month(s)</td>
                                                                        </tr>
                                                                    </table>                                                                </td>
                                                            </tr>
                                                        
                                                            <tr>
                                                                <td width="130" class="pix8">
                                                                    </td>
                                                                <td>
                                                                    &nbsp;</td>
                                                            </tr>
                                                        
                                                            <tr>
                                                                <td>
                                                                    <asp:RadioButton ID="rbRelative" runat="server" Text="The" CssClass="chbox" 
                                                                        GroupName="Month" onclick="changeOccur('at');"/>                                                                </td>
                                                                <td><table border="0" cellpadding="0" cellspacing="0">
                                                                        <tr>
                                                                            <td>
                                                                                <asp:DropDownList ID="ddlRelative" runat="server" CssClass="ddl1">
                                                                                    <asp:ListItem Value="1">First</asp:ListItem>
                                                                                    <asp:ListItem Value="2">Second</asp:ListItem>
                                                                                    <asp:ListItem Value="4">Third</asp:ListItem>
                                                                                    <asp:ListItem Value="8">Fourth</asp:ListItem>
                                                                                    <asp:ListItem Value="16">Last</asp:ListItem>
                                                                                </asp:DropDownList>
                                                                                &nbsp;
                                                                                <asp:DropDownList
                                                                                    ID="ddlType" runat="server" CssClass="ddl1" >
                                                                                    <asp:ListItem Selected="True" Value="2">Monday</asp:ListItem>
                                                                                    <asp:ListItem Value="3">Tuesday</asp:ListItem>
                                                                                    <asp:ListItem Value="4">Wednesday </asp:ListItem>
                                                                                    <asp:ListItem Value="5">Thursday</asp:ListItem>
                                                                                    <asp:ListItem Value="6">Friday</asp:ListItem>
                                                                                    <asp:ListItem Value="7">Saturday</asp:ListItem>
                                                                                    <asp:ListItem Value="1">Sunday</asp:ListItem>
                                                                                    <asp:ListItem Value="8">Day</asp:ListItem>
                                                                                    <asp:ListItem Value="9">Weekday</asp:ListItem>
                                                                                    <asp:ListItem Value="10">Weekend day</asp:ListItem>
                                                                                </asp:DropDownList> of every</td>
                                                                             <td width="5">                                                                                </td>
                                                                            <td>
                                                                            <table border="0" cellpadding="0" cellspacing="0"><tr><td>
                                                                                <asp:TextBox ID="txtRecMonths1" runat="server" CssClass="txtbox4" 
                                                                                    Enabled="False"></asp:TextBox>
                                                                                <cc1:NumericUpDownExtender ID="txtRecMonths1_NumericUpDownExtender" 
                                                                                    runat="server" Enabled="True" Maximum="99" 
                                                                                    Minimum="1" RefValues="" ServiceDownMethod="" 
                                                                                    ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="RecMonths1down" 
                                                                                    TargetButtonUpID="RecMonths1up" TargetControlID="txtRecMonths1">
                                                                                </cc1:NumericUpDownExtender>
                                                                                </td><td>
                                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                                    <tr><td><img id="RecMonths1up" runat="server" src="../images/top_arrow.jpg" /></td></tr>
                                                                                    <tr><td><img id="RecMonths1down" runat="server" src="../images/bot_arrow.jpg" /></td></tr>
                                                                                </table> 
                                                                             </td></tr></table> 
                                                                                </td>
                                                                            <td>
                                                                                month(s)</td>
                                                                        </tr>
                                                                    </table></td>
                                                            </tr>
                                                        </table>
                            </div>
                            <div id="weekly"> <%-- <div id="MsgBlock1" style="position:absolute; display:block; background-color:#CCCC33"> 
       <asp:Label ID="MasterMsg" runat="server" Text="sdfsdf"></asp:Label>
   </div>--%>
                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td width="130">
                                                                            Recurs every:</td>
                                                        <td>
                                                         <table border="0" cellpadding="0" cellspacing="0"><tr><td>
                                                            <asp:TextBox ID="txtRecWeeks" runat="server" CssClass="txtbox4"></asp:TextBox>
                                                            <cc1:NumericUpDownExtender ID="txtRecWeeks_NumericUpDownExtender" 
                                                                runat="server" Enabled="True" Maximum="100" 
                                                                Minimum="1" RefValues="" ServiceDownMethod="" 
                                                                ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="txtRecWeeksdown" 
                                                                TargetButtonUpID="txtRecWeeksup" TargetControlID="txtRecWeeks" > </cc1:NumericUpDownExtender>
                                                                </td><td>
                                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                                    <tr><td><img id="txtRecWeeksup" runat="server" src="../images/top_arrow.jpg" /></td></tr>
                                                                                    <tr><td><img id="txtRecWeeksdown" runat="server" src="../images/bot_arrow.jpg" /></td></tr>
                                                                                </table> 
                                                                             </td></tr></table> 
                                                                        </td>
                                                        <td>
                                                            Week(s) on</td>
                                                        <td>
                                                            &nbsp;</td>
                                                    </tr>
                                                    <tr>
                                                        <td >                                                            </td>
                                                        <td colspan="2">
                                                        
                                                            <table border="0" cellpadding="0" cellspacing="0" style="width:100%;">
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbMon" runat="server" Text="Monday" 
                                                                            CssClass="chbox" />                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbTue" runat="server" Text="Tuesday" CssClass="chbox" />                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbWed" runat="server" Text="Wednesday " CssClass="chbox" />                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbThu" runat="server" Text="Thursday" CssClass="chbox" />                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbFri" runat="server" Text="Friday" CssClass="chbox" />                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbSat" runat="server" Text="Saturday" CssClass="chbox" 
                                                                            />                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <asp:CheckBox ID="cbSun" runat="server" Text="Sunday" CssClass="chbox" />                                                                    </td>
                                                                </tr>
                                                            </table>                                                            </td>
                                                        <td>
                                                        
                                                            &nbsp;</td>
                                                                    </tr>
                                                                </table>
                            </div>
                            <div id="daily">
                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                      <tr>
                                                                        <td width="130">
                                                                            Recurs every:</td>
                                                        <td >
                                                        <table border="0" cellpadding="0" cellspacing="0"><tr><td>
                                                            <asp:TextBox ID="txtFreqDays" runat="server" CssClass="txtbox4" ></asp:TextBox>
                                                            <cc1:NumericUpDownExtender ID="txtFreqDays_NumericUpDownExtender" runat="server" 
                                                                Enabled="True" Maximum="100" 
                                                                Minimum="1" RefValues="" ServiceDownMethod=""
                                                                ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="txtFreqDaysdown" 
                                                                TargetButtonUpID="txtFreqDaysup" TargetControlID="txtFreqDays" ></cc1:NumericUpDownExtender>
                                                                 </td><td>
                                                                                <table border="0" cellpadding="0" cellspacing="0">
                                                                                    <tr><td><img id="txtFreqDaysup" runat="server" src="../images/top_arrow.jpg" /></td></tr>
                                                                                    <tr><td><img id="txtFreqDaysdown" runat="server" src="../images/bot_arrow.jpg" /></td></tr>
                                                                                </table> 
                                                                             </td></tr></table> 
                                                                        </td>
                                                        <td >
                                                            &nbsp; Day(s)</td>
                                                                    </tr>
                                                                </table>
                          </div>                            </td>
                    </tr>
                    </table>
                    </fieldset>
                   
                    
                    
                    
          </td>
           
        </tr>
        <tr>
            <td height="5">
                </td>
           
        </tr>
        
        <tr>
            <td>
        <fieldset   title="Frequency">
            <legend class="ph1">Daily Frequency</legend>        
                <table border="0" cellpadding="0" cellspacing="0" >
          <tr>
                        <td width="130">
                            <asp:RadioButton ID="rbAt" runat="server" GroupName="DailyFreq" 
                                Text="Occurs once at:(HH:mm:ss)" onclick="changeFreq('at');" Checked="True" CssClass="rdbtn" />
                            </td>
                        <td colspan="3" >
                            <asp:TextBox onclick="textChanged('txtAt');" ID="txtAt" runat="server" CssClass="txtbox4">00:00:00</asp:TextBox>
                            &nbsp;
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtAt" 
                        ValidationExpression="^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])">*</asp:RegularExpressionValidator>                        </td>
                        <td width="5"></td>
                        <td >&nbsp;                            </td>
                        <td >&nbsp;</td>
                    </tr>
                    <tr>
                      <td colspan="7" class="pix8" ></td>
                    </tr>
                    <tr>
                        <td >
                            <asp:RadioButton ID="rbEvery" runat="server" GroupName="DailyFreq" 
                                Text="Occurs every:" onclick="changeFreq('every');" CssClass="rdbtn"/></td>
                      <td nowrap="nowrap" >
                      <table border="0" cellpadding="0" cellspacing="0"><tr><td>
                            <asp:TextBox ID="txtEvery" runat="server" CssClass="txtbox4"></asp:TextBox>
                            <cc1:NumericUpDownExtender ID="txtEvery_NumericUpDownExtender" runat="server" 
                                Enabled="True" Maximum="60" 
                                Minimum="1" RefValues="" ServiceDownMethod="" 
                                ServiceDownPath="" ServiceUpMethod="" Tag="" TargetButtonDownID="txtEverydown" 
                                TargetButtonUpID="txtEveryup" TargetControlID="txtEvery" > </cc1:NumericUpDownExtender>
                             </td><td>
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr><td><img id="txtEveryup" runat="server" src="../images/top_arrow.jpg" /></td></tr>
                                <tr><td><img id="txtEverydown" runat="server" src="../images/bot_arrow.jpg" /></td></tr>
                            </table> 
                         </td></tr></table>
                
                                                  </td>
                        
                      <td nowrap="nowrap" width="5" >
                          </td>
                        
                      <td nowrap="nowrap" >
                          <asp:DropDownList ID="ddlTimeType" runat="server" CssClass="ddl1">
                                <asp:ListItem Selected="True" Value="8">hour(s)</asp:ListItem>
                                <asp:ListItem Value="4">minute(s)</asp:ListItem>
                                <asp:ListItem Value="2">second(s)</asp:ListItem>
                            </asp:DropDownList></td>
                        <td >
                            &nbsp;</td>
                        <td >
                      Starting at:(HH:mm:ss)</td>
                        <td >
                            <asp:TextBox onclick="textChanged('txtStartTime');" ID="txtStartTime" runat="server" CssClass="txtbox4">00:00:00</asp:TextBox>
                            &nbsp;
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtStartTime" 
                        ValidationExpression="^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])">*</asp:RegularExpressionValidator>                      </td>
                    </tr>
                    <tr>
                      <td colspan="7" class="pix8" ></td>
                    </tr>
                    <tr>
                        <td >&nbsp;                            </td>
                        <td colspan="3" >&nbsp;                            </td>
                        <td >
                            &nbsp;</td>
                        <td >
                            Ending at:(HH:mm:ss)</td>
                        <td >
                            <asp:TextBox onclick="textChanged('txtEndTime');" ID="txtEndTime" runat="server" CssClass="txtbox4" 
                                >23:59:59</asp:TextBox>
                              &nbsp;  
                             <asp:RegularExpressionValidator ID="RegularExpressionValidator5" 
                                runat="server" ControlToValidate="txtEndTime" 
                        ValidationExpression="^([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9])">*</asp:RegularExpressionValidator>                        </td>
                    </tr>
                    <tr>
                        <td >&nbsp;                            </td>
                        <td colspan="3" >&nbsp;                            </td>
                        <td >&nbsp;</td>
                        <td >&nbsp;                            </td>
                        <td ></td>
                    </tr>
                </table>
                </fieldset>
              </td>
           
        </tr>
        
        
        
        <tr>
            <td >
                </td>
           
        </tr>
       
        <tr>
            <td>
            <fieldset   title="Frequency">
            <legend class="ph1">Duration</legend> 
                <table border="0" cellpadding="0" cellspacing="0">
          <tr>
                        <td width="130">
                            Start date:(dd/MM/yyyy)</td>
                        <td >
                            <asp:TextBox onclick="textChanged('txtStartDate');" ID="txtStartDate" runat="server" CssClass="txtbox4"></asp:TextBox>
                            <cc1:CalendarExtender ID="txtStartDate_CalendarExtender" runat="server" 
                                Enabled="True" TargetControlID="txtStartDate" PopupButtonID="cal2" Format="dd/MM/yyyy"></cc1:CalendarExtender>
                            &nbsp;
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" 
                        ControlToValidate="txtStartDate"
                                
                                ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>                            </td>
                        <td>
                        <img runat="server" id="cal2" src="../images/calander.jpg" />                            </td>
                        <td >                            </td>
                        <td>&nbsp;                            </td>
                    </tr>
                    <tr>
                      <td colspan="5" class="pix8" ></td>
                    </tr>
                    <tr>
                        <td >
                            End date:(dd/MM/yyyy)</td>
                        <td >
                            <asp:TextBox onclick="textChanged('txtEndDate');" ID="txtEndDate" runat="server" CssClass="txtbox4"></asp:TextBox>
                            <cc1:CalendarExtender ID="txtEndDate_CalendarExtender" runat="server" 
                                Enabled="True" TargetControlID="txtEndDate" PopupButtonID="cal3" 
                                Format="dd/MM/yyyy"></cc1:CalendarExtender>
                            &nbsp;
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" 
                        ControlToValidate="txtEndDate"
                                
                                ValidationExpression="^([1-9]|0[1-9]|[12][0-9]|3[01])[/.]([1-9]|0[1-9]|1[012])[/.][0-9]{4}$">*</asp:RegularExpressionValidator>                        </td>
                        <td><img  runat="server" id="cal3" src="../images/calander.jpg" /></td>
                        <td class="style15">&nbsp;                            </td>
                        <td>
                            <asp:CheckBox ID="cbEndDate" runat="server" Text="No End date" 
                                onclick="checking(this.checked);" />                        </td>
                    </tr>
                    </table>
                    </fieldset>
              </td>
           
        </tr>
       
         
    </table>
     </div>
     
     </td></tr>
     <tr><td height="5">
    </td></tr>
     <tr><td>
     
    <table border="0" cellpadding="0" cellspacing="0">
    
    <tr><td align="right">
    <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <asp:Button ID="btnApply" runat="server" Text="Apply"
                                onclick="btnApply_Click" onclientclick="validationSummery();" 
                                CssClass=btn/>
                        </td>
                        <td>
                            <asp:Button ID="btnHistory" runat="server" Text="History" 
                                CausesValidation="False" CssClass=btn onclick="btnHistory_Click" />
                        </td>
                        <%--<td>
                            <asp:Button ID="Button2" runat="server" Text="Cancel" 
                                CausesValidation="False" CssClass=btn /> 
                        </td>--%>
                    </tr>
                    </table>
                    </td></tr>
</table>
</td></tr>
     <tr><td>
     
         <asp:ScriptManager ID="ScriptManager1" runat="server">
         </asp:ScriptManager>
         </td></tr>
   </table>
   <%-- <div id="MsgBlock1" style="position:absolute; display:block; background-color:#CCCC33"> 
       <asp:Label ID="MasterMsg" runat="server" Text="sdfsdf"></asp:Label>
   </div>--%>
</asp:Content>
